﻿/**
 *
 * @file BrowserTableHandlerSubsystemAbstract.h
 * @brief 子系统表格处理器抽象类声明
 * @author wangning (2185896382@qq.com)
 * @date 2024-12-23
 *
 */
#ifndef _BEOWSERTABLE_HANDLER_SUBSYSTEM_Abstract_H___
#define _BEOWSERTABLE_HANDLER_SUBSYSTEM_Abstract_H___

#include "WidgetBrowserTable.h"

namespace EventOper
{
    class OperAbstractSubsystem;
}
namespace Acoustics
{
    class FITKAcousticsSEASubSysManager;
    class FITKAcousticsPhysicsPropManager;
    class FITKAcousticsSpectraManager;
    class FITKAcousticsFESubSysManager;
    class FITKAcousticsSensorsManager;
}

namespace GUI
{
    /**
     * @brief 子系统/传感器表格处理器抽象类声明
     * @author wangning (2185896382@qq.com)
     * @date 2024-12-10
     */
    class GUIWIDGETAPI BrowserTableHandlerSubsystemAbstract : public BrowserTableAbstractHandler
    {
        Q_OBJECT
    public:
        BrowserTableHandlerSubsystemAbstract(WidgetBrowserTable* table);
        virtual ~BrowserTableHandlerSubsystemAbstract() = 0;
        /**
         * @brief 右键菜单
         * @param[i]  popMenu        右键菜单
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void contextMenu(QMenu* popMenu) override;
        /**
         * @brief 表头右键菜单
         * @param[i]  popMenu        右键菜单
         * @param[i]  coluIndex      列索引
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void headerContextMenu(QMenu* popMenu, int coluIndex) override;

    protected:
        /**
         * @brief 获取操作器
         * @return EventOper::OperAbstractSubsystem*
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual EventOper::OperAbstractSubsystem* getSubsystemOper() = 0;
        /**
         * @brief 是否允许批量修改
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-09
         */
        virtual bool enableAttriSet();
        /**
         * @brief 单元格双击
         * @param[i]  row         行索引
         * @param[i]  colum         列索引
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void itemDoubleClicked(int row, int colum) override;

    private slots:
        /**
         * @brief 编辑子系统
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        void editSubsystemSlot();
        /**
         * @brief 移除子系统
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        void removeSubsystemSlot();
        /**
         * @brief  批量设置子系统
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        void setAttributeSlot();

    protected:
        /**
         * @brief  SEA子系统管理器
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        Acoustics::FITKAcousticsSEASubSysManager* _seaMgr{};
        /**
         * @brief  物理属性管理器
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        Acoustics::FITKAcousticsPhysicsPropManager* _propMgr{};
        /**
        * @brief  频谱管理器
        * @author wangning (2185896382@qq.com)
        * @date 2024-12-10
        */
        Acoustics::FITKAcousticsSpectraManager* _specMgr{};
        /**
        * @brief  FE子系统管理器
        * @author wangning (2185896382@qq.com)
        * @date 2024-12-10
        */
        Acoustics::FITKAcousticsFESubSysManager* _feMgr{};
        /**
        * @brief  FE传感器管理器
        * @author wangning (2185896382@qq.com)
        * @date 2025-02-26
        */
        Acoustics::FITKAcousticsSensorsManager* _sensorMgr{};
    };
}


#endif
